import { Toast } from '@nutui/nutui-react';

export const TIPS: Record<string, string> = {
  phoneNum: '请输入正确的手机号'
};
export const VERIFY_DICT: Record<string, (value: string, tips?: string) => boolean> = {
  phone: (val, tips) => {
    if (
      !val ||
      val?.trim?.().length === 0 ||
      !/^1(?!70|71|62|67|65|2\d)[0-9]{10}$/g.test(val?.trim?.())
    ) {
      tips && Toast.show(tips);
      return false;
    }
    return true;
  }
};
